﻿@using BLL
@model Model.SysMenuInfo
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Main.cshtml";
} 
<style type="text/css">
    textarea
    {
        width: 400px;
        border: 1px solid #ccc;
        padding: 2px;
    }
</style>
<script type="text/javascript">
    function SubmitForm() {
        if ($('#ff').form("validate")) {
            $('#ff').form('submit');
            BackToList();
        }
    }
    function getReturn(v) { 
    
    }
    function BackToList() {
        window.location.href = "/SysMenu/Index";
    }
</script>
<link href="/CSS/PageStyle.css" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/JScriptCommon.js")" type="text/javascript"></script>
<div id="p" class="easyui-panel" style="width: 700px; padding: 10px 5px 10px 5px;"
    data-options="title:'菜单信息修改',iconCls:'icon-edit'">
    <form id="ff" action="/SysMenu/Edit" method="post">
    <div class="edit_main2">
        <table style="width: 680px" cellpadding="0" cellspacing="0" class="table_bg">
            <colgroup>
                <col style="width: 15%;" />
                <col style="width: 35%;" />
                <col style="width: 15%;" />
                <col style="width: 35%;" />
            </colgroup>
            <tr>
                <td style="text-align: right">
                    <div class="editor-label2">
                        @Html.LabelFor(model => model.Name)：
                    </div>
                </td>
                <td>
                    <div class="editor-field2">
                        @Html.HiddenFor(model => model.Id)
                        <input type="text" id="txt_Name" name="Name" value="@Model.Name" class="easyui-validatebox" data-options="required:true"/>
                    </div>
                </td>
                <td style="text-align: right">
                    <div class="editor-label2">
                        @Html.LabelFor(model => model.ParentId)：
                    </div>
                </td>
                <td>
                <div style="height:30px;"><div style="width:150px; float:left; height:30px;">
                    <div id="checkParentId">
                    </div>
                    <div id="checkSysOperationId">
                        @if (Model != null && !string.IsNullOrWhiteSpace(Model.ParentId) && !string.IsNullOrWhiteSpace(Model.ParentName))
                        { 
                            <table id="@Model.ParentId" class="deleteStyle">
                                <tr>
                                    <td>
                                        <img alt="删除" title="点击删除" onclick="deleteTable('@Model.ParentId','ParentId');"
                                                     src="/Images/del.gif" />
                                    </td>
                                    <td>
                                        @Model.ParentName
                                    </td>
                                </tr>
                            </table> 
                        }
                        @Html.HiddenFor(model => model.SysRightId)
                        @Html.HiddenFor(model => model.ParentId)
                    </div> </div><div style="width:80px; float:left;line-height:20px; padding-top:5px;">
                    <a style="cursor: pointer" onclick="showModalOnly('ParentId','/SysMenu/Index');">点击选择
                    </a></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    <div class="editor-label2">
                        @Html.LabelFor(model => model.Url)：
                    </div>
                </td>
                <td>
                    <div class="editor-field2">
                        <input type="text" id="txt_Url" name="Url" value="@Model.Url" class="easyui-validatebox"/>
                    </div>
                </td>
                <td style="text-align: right">
                    <div class="editor-label2">
                        @Html.LabelFor(model => model.State)：
                    </div>
                </td>
                <td> 
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    <div class="editor-label2">
                        @Html.LabelFor(model => model.Sort)：
                    </div>
                </td>
                <td>
                    <div class="editor-field2">
                        <input type="text" id="txt_Sort" name="Sort" value="@Model.Sort" onkeyup="isInt(this)" class="easyui-validatebox"/>
                    </div>
                </td>
                <td style="text-align: right">
                    <div class="editor-label2">
                    </div>
                </td>
                <td>
                    <div class="editor-field2">
                    </div>
                </td>
            </tr>
            @Html.HiddenFor(model => model.SysRightId)
        </table>
        <div class="configFoot">
            <input class="submitcss" type="submit" value="提交" />
            <input class="submitcss" type="button" onclick="BackList('SysMenu/index')" value="返回" />
        </div>
    </div>
    </form>
</div>
